<?php 
require_once 'config.php';

$dbConn = mysql_pconnect (DBHOST,DBUSER,DBPASS) or die ('MySQL connect failed. ' . mysql_error());
mysql_select_db(DBNAME);

$sanitize = new SanitizeDatabase();

$sanitize->sanitize(); 

class SanitizeDatabase	{
	
	function sanitize()	{
			
			$student_query = mysql_query("SELECT * from `student`") or die(mysql_error());
 			$i=1;
			while($c=mysql_fetch_row($student_query))
			{
				mysql_query("UPDATE student SET full_name='Student$i' , email='email$i' where full_name='$c[1]' ") or die(mysql_error());
				$i++; 
			}	
	}
}

?>